fixes to logging