Small improvements to logging etc