Together with the multi-byte character issue mentioned above, the `content.toString` is dangerous here.  The last character may be incomplete and will be discarded.