Fix file save error on Windows