Is there a missing hack '\' in the following line?
$srv="\\server\log"+$strComputer+".txt"

Seems to me, there needs to be a share name in the path. Is 'log' the share?

You are optimistic that Open() works and you don't handle the return code.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.