add debug and daemonize option