add logger and daemonize option