`ERROR_ACCESS_DENIED` is in fact the error I get in the case described above. I don't really understand what's going on, maybe the anti virus software protects the files while it's scanning them. Anyhow - this PR fixes the problem.