get_train_file_by_label now saves the file to the 'generated' directory.