Update to Client.cs to write text file