private boolean checkFile(String[] filesInDir, String stem) throws IOException{
        if (filesInDir != null){
            boolean bed = false;
            boolean bnt = false;
            boolean bim = false;
            for (String s : filesInDir){
                if (s.equals(stem+".bed")){
                    bed = true;
                }else if (s.equals(stem+".bnt")){
                    bnt = true;
                }else if (s.equals(stem+".bim")){
                    bim = true;
                }
            }

            if (!bed){
                Genoplot.ld.log("Missing file: " + stem+".bed!");
            }
            if (!bnt){
                Genoplot.ld.log("Missing file: " + stem+".bnt!");
            }
            if (!bim){
                Genoplot.ld.log("Missing file: " + stem+".bim!");
            }
            return bed & bnt & bim;
        }else{
            throw new IOException("Could not get list of files in data directory.");
        }
    }