content is passed correctly between server and client now. all that's left is to write to file and fix the encrypting bug.