Fix exception/next bug in file upload fix script.