Append a unique ID to each group when generating the CSV.