System.err.println("Error: File not loaded: File not found."); e.printStackTrace();
System.out.println("Error: File not loaded: File not found.");
    public boolean loadRom(File rompath)    {        setDefaultDir(rompath.getParent());        //        if (rompath.length() == ROM_SIZE_REGULAR)        //        {        //            this.isExpanded = false;        //        }        //        else if (rompath.length() == ROM_SIZE_EXPANDED)        //        {        //            this.isExpanded = true;        //        }        //        else        //        {        //            this.isValid = false;        //            //Not either size, assume bad rom        //            int ques = JOptionPane        //                .showConfirmDialog(        //                    null,        //                    "File is the wrong size. It may not be a ROM\nContinue anyways?",        //                    "Error!", JOptionPane.YES_NO_OPTION);        //            if (ques == JOptionPane.NO_OPTION) { return false; }        //            if (Math.abs(rompath.length() - ROM_SIZE_REGULAR) < Math        //                .abs(rompath.length() - ROM_SIZE_EXPANDED))        //            //if the size is closer to $regSize        //            {        //                this.isExpanded = false;        //            }        //            else        //            {        //                this.isExpanded = true;        //            }        //        }        try        {            readFromRom(rompath);        }        catch (FileNotFoundException e)        {            JOptionPane.showMessageDialog(null, "File not found:\n"                + rompath.getAbsolutePath(), "Error Loading ROM",                JOptionPane.ERROR_MESSAGE);            System.err.println("Error: File not loaded: File not found.");            e.printStackTrace();            return false;        }        catch (IOException e)        {            System.err.println("Error: File not loaded: Could read file.");            e.printStackTrace();            return false;        }        this.path = rompath;        System.out.println("Opened ROM: " + rompath.toString());        System.out.println("AbstractRom size is: " + rompath.length());        this.isLoaded = true;        //set rom type        //first look for .romtype file        if (!loadRomType())        {            //            //then look at certain bytes            //            //Earthbound            //            if (length() >= 0x300200            //                && compare(0x1f005, new int[]{0xa9, 0x5e, 0xc0, 0x85, 0x12,            //                    0xa9, 0xc4, 0x00}))            //            {            //                //1F005 - 1F00C = "Start New Game" text pointer            //                //should be [a9 5e c0 85 12 a9 c4 00]            //                setRomType(TYPE_EARTHBOUND);            //            }            //            //SOM            //            else if (length() >= 0x200000            //                && compare(0x230, new int[]{0x48, 0xab, 0xbd, 0x00, 0x00}))            //            {            //                //0x230 unknown            //                setRomType(TYPE_SECRET_OF_MANA);            //            }            //            //CT            //            else if (length() >= 0x400200            //                && compare(0x270, new int[]{0x00, 0xc2, 0xe0, 0xff, 0x01, 0x30,            //                    0x06, 0xa2}))            //            {            //                //0x270 unknown            //                setRomType(TYPE_CHRONO_TRIGGER);            //            }            //            //all tests failed, unknown            //            else            //            {            //                //unknown            //                setRomType(TYPE_UNKNOWN);            //            }            setRomType(RomTypeFinder.getRomType(this));        }        return true;    }