Added daemonize code