There are some potential areas that could cause errors. These are:
Line 21: "err" used to be hoisted to global scope.
Lines 132/179/203: "files" is already in scope, it's defined in the parent function. - UPDATE: Actually, this is not an issue since these variables are all the same within the same scope.
There are some potential areas that could cause errors. These are:
Some unused global variables are commented out.