Add exception handling for the daemons.