Added shutdownDaemon()