Notwithstanding the foregoing, the Secretary may insure a loan for improvements or additions to a multifamily housing project, or a group practice or medical practice facility or hospital or other health facility approved by the Secretary, which is not covered by a mortgage insured under this chapter, if he finds that such a loan would assist in preserving, expanding, or improving housing opportunities, or in providing protection against fire or other hazards. Such loans shall have a maturity satisfactory to the Secretary and shall meet such other conditions as the Secretary may prescribe. In no event shall such a loan be insured if it is for an amount in excess of the maximum amount which could be approved if the outstanding indebtedness, if any, covering the property were a mortgage insured under this chapter. At any sale under foreclosure of a mortgage on a project or facility which is not insured under this chapter but which is senior to a loan assigned to the Secretary pursuant to subsection (c) of this section, the Secretary is authorized to bid, in addition to amounts authorized under section
1713
(k) of this title, any sum up to but not in excess of the total unpaid indebtedness secured by such senior mortgage, plus taxes, insurance, foreclosure costs, fees, and other expenses. In the event that, pursuant to subsection (c) of this section, the Secretary acquires title to, or is assigned, a loan covering a project or facility which is subject to a mortgage which is not insured under this chapter, the Secretary is authorized to make payments from the General Insurance Fund on the debt secured by such mortgage, and to take such other steps as the Secretary may deem appropriate to preserve or protect the Secretary’s interest in the project or facility.