Parsing data to text file