added the dumpDatatoTxt method