Added some try/catch blocks to keep the Daemon from dying.