update dumpRecordsToFile to dumpRecords