prints data out into a CSV file