If any collector of taxes fails to pay taxes collected within the time limited by law or by the community imposing such tax, any judge of the Superior Court, on application of the selectmen of the town or the committee of the municipal district imposing such tax, shall grant an execution against the estate of such collector, of the same form and to be levied in the same manner as executions in civil actions. If any collector of taxes fails to perform the duties of his appointment, any judge of the Superior Court, on written application of the selectmen of the town, the mayor and alderman of the city, the warden and burgesses of the borough or the committee of the municipal district which laid the taxes, after due notice and hearing, may remove him from office.