(b) Subject to the provisions of the agreement with said agency, the commissioner may contract with any person, firm or corporation which he deems qualified to operate and manage such project and to perform such duties and functions as he may deem necessary. 4. Whenever the commissioner shall be of the opinion that an eligible borrower is failing or omitting, or is about to fail or omit to do anything required of it by law or by order of the commissioner and is doing or is about to do anything, or permitting anything, or is about to permit anything to be done, contrary to or in violation of law or of any order of the commissioner, or which is improvident or prejudicial to the interest of the public, the lienholders, the shareholders, or the occupants, the commissioner may, in addition to such other remedies as may be available, commence an action or proceeding in the supreme court of the state of New York in the name of the commissioner, for the purpose of having such violations or threatened violations stopped and prevented, and in such action or proceeding, the court may appoint a temporary or permanent receiver or both. Such action or proceeding shall be commenced by a petition to the supreme court, alleging the violation complained of and praying for appropriate relief. It shall thereupon be the duty of the court to specify the time, not exceeding twenty days after service of a copy of the petition, within which the eligible borrowers complained of must answer the petition. In case of any default or after answer the court shall immediately inquire into the facts and circumstances in such manner as the court shall direct in the interest of substantial justice without other or formal pleading. Such other persons or corporations as it shall seem to the court necessary or proper to join as parties in order to make its order or judgment effective, may be joined as parties. The final judgment in any such action or proceeding shall either dismiss the action or proceeding or direct that an order or an injunction, or both, issue, or provide for the appointment of a receiver as prayed for in the petition, or grant such other relief as the court may deem appropriate.