Various logging tidy-ups