clean up a bit
catch any std::exception that occurs in the build because the service should not terminate in case of some IO error