Undid change to Write method. That may need to be fixed later, but not with this commit.