Changed the writer to now send the bytes instead of text. When sending text, data was lost.