Minor improvements to logging