Some tweaks to improve logging output.