Small fixes

* Close stream after use
* Use StandardCharsets to get UTF-8 charset
* Throw something when catching an IOException during serialization