Completed method to write a valid submission csv file.