Attempt #2 to fix file write errors with win8