Modify output to file functionality to isolate failure instances.