stupid global variable crashed a different loop

scope rules in R are annoying.

modified:   Rwork/fetchFiles.R