fixed UTF-8 encoding for file R/W ops