private Boolean checkForValidFile(File dataFile){
        
        final JPanel frame = new JPanel();
        if(!checkForCommas(dataFile)){
            JOptionPane.showMessageDialog(frame,
                "File not compatible (contains no commas)",
                "File error",
                JOptionPane.ERROR_MESSAGE);
            return false;
        }
        
        if(!checkForAttributes(dataFile)){
            JOptionPane.showMessageDialog(frame,
                "File not compatible (attribute error)",
                "File error",
                JOptionPane.ERROR_MESSAGE);
            return false;
        }
        
        if(!checkForConsistentData(dataFile)){
            JOptionPane.showMessageDialog(frame,
                "File not compatible (Data not consistent)",
                "File error",
                JOptionPane.ERROR_MESSAGE);
            return false;
        }
        return true;
    }