Further improvements to logging