Bug fix : using UTF-8 encoding both for reading and writing files