open file for writing with encoding="utf8"