(a) If, after a trial, the Court shall determine that the petition should be granted, the Court shall immediately enter judgment thereon and appoint a receiver as authorized herein; provided, however, prior to the entry to judgment and appointment of a receiver, the owner or any mortgagee or lienor of record or other person having an interest in the property may apply to the Court to be permitted to remove or remedy the conditions specified in the petition. If such person demonstrates the ability to perform promptly the necessary work and posts security for the performance thereof within the time, and in the amount and manner, deemed necessary by the Court, then the Court may stay judgment and issue an order permitting such person to perform the work within a time fixed by the Court and requiring such person to report to the Court periodically on the progress of the work. The Court shall retain jurisdiction over the matter until the work is completed.
(b) If, after the issuance of an order under the foregoing provision but before the time fixed in such order for the completion of the work prescribed therein, there is reason to believe that the work will not be completed pursuant to the court's order or that the person permitted to do the same is not proceeding with due diligence, the Court or the petitioners, upon notice to all parties to the proceeding, may move that a hearing be held to determine whether judgment should be rendered immediately as provided in the following subsection.
(c) (1) If, upon a hearing authorized in the preceding subsection, the Court shall determine that such party is not proceeding with due diligence, or upon the actual failure of such person to complete the work in accordance with the provisions of the order, the Court shall appoint a receiver as authorized herein.
(2) Such judgment shall direct the receiver to apply the security posted to executing the powers and duties as described herein.
(3) In the event that the amount of such security should be insufficient to accomplish the above objectives, such judgment shall direct the receiver to collect the rents, profits and issues to the extent of the deficiency. In the event that the security should exceed the amount necessary to accomplish the above objectives, such judgment shall direct the receiver to return the excess to the person posting the security.