added write to text file class