protected FilenameFilter newFilenameFilter() {
        final FilenameFilter ff = new FilenameFilter() {
            public boolean accept(final File dir, final String name) {
                if (name == null || name.length() == 0) {
                    return false;
                }
                final boolean hasExt = conf.getRegexIncludeExt() != null && conf.getRegexIncludeExt().length() > 0;
                if (hasExt && name.matches(conf.getRegexIncludeExt())) {
                    if (name.matches(conf.getRegexIncludeFile())) {
                        return true;
                    }
                } else {
                    if (name.matches(conf.getRegexIncludeFile())) {
                        return true;
                    }   
                } // End of the if - else //
                return false;
            }
        };
        return ff;
    }