8. When a building is in such a condition that the risks of fire or explosion that it presents or the consequences of a fire that it has sustained or of an explosion which has destroyed or damaged it endanger persons or property, a judge of the Superior Court sitting in the district where such building is situated may, upon motion by the Director General presented even during a suit, order the owner of the building or any other person in charge thereof to perform the works necessary to ensure the safety of such persons or property or, if there is no other effective remedy, and if the owner has been impleaded, to demolish the building within such delay as he fixes, and order that on failure to do so within such delay, the Director General may perform such works or effect such demolition at the expense of the owner of the building.
In case of exceptional urgency, the judge may authorize the Director General to perform such works or effect such demolition forthwith, and the Director General may claim the cost thereof from the owner.
When the owner of the building or the person in charge thereof is unknown or of doubtful identity or cannot be found, the judge may authorize the Director General to perform the works or effect the demolition forthwith, and the Director General may claim the cost thereof from the owner of the building if he identifies or finds him.
The judge may also in all cases order the persons who inhabit the building to vacate the same within such delay as he fixes.
The motion shall be served in the manner prescribed by the judge unless he dispenses with service; it shall be heard and decided by preference; when it is presented, the judge may authorize the parties to file a written contestation within such delay as he determines and fix a date for proof and hearing; he may also require any evidence that he deems necessary.