fix csv formating when outputing multiple records