daemonize, save environment