Every consul general, consul, or vice consul appointed to perform the duty of any such officer, who omits to collect any fees which he is entitled to charge for any official service, shall be liable to the United States therefor, as if he had collected the same; unless, upon good cause shown therefor, the Secretary of the Treasury shall think proper to remit the same.