Improve error logging.
[#75081646]