better syntax for calling loopThroughFiles