More fixes to logging