Added daemonize functionality