fix sorting the file list inside the loop