To every building which shall appear to the inspector to be dangerous to life or limb or, because of its liability to fire, bad condition of walls, overloaded floors, defective construction, decay or other cause, shall be held to be unsafe the inspector shall affix a notice of the dangerous character of the structure at a conspicuous place on the exterior wall of the building and shall give immediate notice to the owner or agent, fixing a reasonable time under the circumstances for the correction of such condition.