Improve log in error messages.