added daemonize flag