Daemonize and logging.