The Superior Court, upon a motion by the receiver or the owner of such facility, may terminate the receivership if it finds that the facility has been rehabilitated so that the violations complained of no longer exist or, if the receivership was instituted pursuant to subdivision (2) of subsection (a) of § 17a-233, the orderly transfer of the residents has been completed and the facility is ready to be closed. Upon such finding, the court may terminate the receivership and return the facility to its owner. In its termination order the court may include such terms as it deems necessary to prevent the conditions complained of from recurring.