moved creation of aFile object out of readTrainingPairs