uncommented createExportFile() function