more fixes to logging