Add support for daemon mode