A certificate of occupancy issued by the building inspector is required in advance of occupancy or use of any building or structure hereafter erected or changed in the occupancy classification or use of an existing building or structure.