Replaced open with codecs.open -> utf8 handling