A certificate of occupancy issued by the building inspector is required in advance of occupancy or use of: (1) Any lot or change in the use thereof; (2) A building hereafter erected or altered or a change in the use of an existing building; or (3) Any nonconforming use that is existing at the time of enactment of the ordinance from which this chapter is derived or an amendment thereto that is changed, extended, altered, or rebuilt thereafter. The certificate of occupancy shall state specifically where the nonconforming use fails to meet the provisions of the chapter. Upon payment of any required fees, the building inspector shall sign and issue a certificate of occupancy if the proposed use of the land or building, as stated on the certificate and signed by the owner or his authorized agent, is found to conform to the applicable provisions of this chapter, and if the building finally constructed complies with the plans submitted for the building permit.