In any case the Department of Public Health may require a deposit in advance of any inspection in such sum as said Department of Public Health may estimate to be sufficient to cover the amount of the fee liable to be imposed therefor, which deposit or sum remaining thereof shall be returned to the depositor upon the failure to issue a permit or upon the expiration of the permit and the payment of all fees therefor.