Fix the bug when a file might be saved to the wrong folder
Correct implementation for toUtf8 and toUtf16