writing tcp clients data into a file