Fix test case logging and add log to debug travis failure.