file to files[fileIndex]