support daemon mode