fixes to logging in