Could this be because you're not freeing the memory used by the 'set' keyword in the vbscript? If you do a 'set f = nothing' afterwards does that solve the problem?