how to send data to text file?