Improve logging of failed tests