performance improvement for lib.walkDir