Added method to create data files for training and testing.