Added function daemonize