A certificate of occupancy issued by the building official is required in advance of occupancy or use, any building or structure hereafter erected, or a change in the use of an existing building or structure. A certificate of occupancy shall not be issued unless the proposed use of a building or land conforms to the applicable provisions of this chapter. If the certificate of occupancy is denied, the building official shall state in writing the reason for the denial and the applicant shall be notified of the denial. A record of all certificates shall be kept on file in the office of the building official and shall be open to public inspection.