private List<File> sortFiles(File dir) {
        ArrayList<File> files = new ArrayList<>();
        files.addAll(List.of(dir.listFiles()));
        Collections.sort(files);
        return files;
    }
Reads all query profile xml files in a given directory,
and all type xml files from the immediate subdirectory "types/" (if any)

@throws IllegalArgumentException if the directory is not readable, or if there is some error in the XML
container-search/src/main/java/com/yahoo/search/query/profile/config/QueryProfileXMLReader.java