Add support for running in non-daemon mode