Fix file encoding bug