Fix file sync error on Windows