Please remove the `looppath` variable and just use `path` in the loop.