updated client.pde to use the working code for saving and uploading data to tcp server. Also, no more restarts in the code.