adding logging fixes