Fix the encoding to UTF-8 when the file is created