daemonize() improvements