convert data into text file