public static HashSet<String> getKvFiles(String dir) throws IOException {
        HashSet<String> returnSet = new HashSet<>();
        Matcher fileMatch = KvPattern.matcher(dir);
        Path init = Paths.get(dir);
        
        if (Files.exists(init)){
            if (Files.isDirectory(init)){
                Iterator<Path> dirStream = Files.newDirectoryStream(init).iterator();
                while(dirStream.hasNext()){
                    Path nextPath = dirStream.next();
                    if(Files.isDirectory(nextPath)){
                        returnSet.addAll(getKvFiles(nextPath.toString()));
                    } else {
                        fileMatch.reset(nextPath.getFileName().toString());
                        if(fileMatch.matches()){
                            returnSet.add(nextPath.toString());
                        }
                    }
                }
            } else if(fileMatch.matches()) {
                returnSet.add(dir);
            }
        }
        return returnSet;
    }