Add function to export CSV version of dataset