Before issuing a permit, the building official shall examine or cause to be examined any building, electrical, gas, mechanical or plumbing system for which an application has been received for a permit to enlarge, alter, repair, install, or change the occupancy of an existing building. He shall inspect all buildings, structures, electrical, gas, mechanical and plumbing systems, from time to time, during and upon completion of the work for which a permit was issued. He shall make a record of every such examination and inspection and of all violations of the standard building codes. A final inspection shall be made of every building, structure, electrical, gas, mechanical or plumbing system upon completion, prior to the issuance of the certificate of occupancy or completion.