add logging to db module