writes scores to file