handle stat sync error
Merge pull request #7 from LtSquigs/master

Handle temporary files