fixed bug with file encoding