private boolean isFileValid(File file, String methodName) {
        // check if the file is invalid or not
        if (file == null) {
            System.out.println(name_ + "." + methodName
                    + ": Warning - the given file is null.");
            return false;
        }

        String fileName = file.getName();
        if (fileName == null || fileName.length() == 0) {
            System.out.println(name_ + "." + methodName
                    + ": Warning - invalid file name.");
            return false;
        }

        return true;
    }