write prediction of labels to files