Can now generate output files for both test data and training data