Final fixes to logging