Fix race condition where result_file would not exist when trying to parse it.