daemonize function OK