writing client to file to learn it's ways