private static String getFileName(String path) {
        if (path == null) {
            return "";
        }
        //filenameUtils checks for a null byte in the path.
        //it will throw an IllegalArgumentException if there is a null byte.
        //given that we're recording names and not using them on a file path
        //we should ignore this.
        try {
            return FilenameUtils.getName(path);
        } catch (IllegalArgumentException e) {
            LOG.warn("{} in {}", e.getMessage(), path);
        }
        path = path.replaceAll("\u0000", " ");
        try {
            return FilenameUtils.getName(path);
        } catch (IllegalArgumentException e) {
            LOG.warn("Again: {} in {}", e.getMessage(), path);
        }
        //give up
        return "";
    }
@param p               path to the common_tokens directory.  If this is null, try to load from classPath
@param defaultLangCode this is the language code to use if a common_words list doesn't exist for the
                       detected langauge; can be <code>null</code>
@throws IOException
tika-eval/tika-eval-app/src/main/java/org/apache/tika/eval/app/AbstractProfiler.java