add fault tolerance to the daemon: unregister itself when necessary