Improve logging on failure.