tweaks to bapil; added new logger api and using that api in the daemon api