adding logging to daemon