application boilerplate with daemon support