§ 94. Foreclosure. 1. In any foreclosure action the commissioner, and the municipality if it has made a loan to the housing company, in addition to other necessary parties, shall be made parties defendant; and the commissioner and the municipality shall take all steps in such action necessary to protect the interest of the public therein, and no costs shall be awarded against him or the municipality. Foreclosure shall not be decreed unless the court to which application therefor is made shall be satisfied that the interests of the lienholder or holders can not be adequately secured or safeguarded except by the sale of the property. In any such proceeding, the court shall be authorized to make an order increasing the rentals to be charged for the housing accommodations in the project involved in such foreclosure, but not exceeding the maximum average rentals fixed herein, or appoint the commissioner as a receiver of the property and in the event the municipality has made a loan to the housing company, appoint an officer or employee of the municipality, or grant such other and further relief as may be reasonable and proper. In the event of a foreclosure sale or other judicial sale, the property shall, except as provided in the next succeeding paragraph of this section, be sold only to a housing company, unless the court shall find that the interest on the bonds cannot be earned under the restrictions imposed by the provisions of this article and that the proceeding was brought in good faith. In such event the property shall be sold free of all restrictions imposed by this article and all the benefits theretofore granted under this article to such project shall thereupon terminate.
2. Notwithstanding the foregoing provisions of this section, wherever it shall appear that a government, the New York state housing finance agency, the New York state urban development corporation, created by the New York state urban development corporation act, the New York city housing development corporation, Battery Park city authority, an organization or entity investing or participating in a loan pursuant to subdivision one of section fifteen of this chapter, or a corporation subject to the supervision of the state department of financial services, shall have loaned on a mortgage which is a lien upon any such property, such government, New York state housing finance agency, New York state urban development corporation, New York city housing development corporation, Battery Park city authority, an organization or entity investing or participating in a loan pursuant to said section fifteen or a corporation subject to such supervision, or any trustee or trustees, or any successor trustee or trustees, for the benefit of any one or more of the aforesaid classes shall have all the remedies available to a mortgagee under the laws of the state of New York, free from any restrictions contained in this section except that the commissioner shall be made a party defendant and that the commissioner shall take all steps necessary to protect the interests of the public and no costs shall be awarded against him or her