private boolean scanAndLoad(File folder, JMenu menu)
            {
                File[] files = folder.listFiles();
                BiomeColorProfile profile;
                boolean foundProfiles = false;
                for (int i = 0; i < files.length; i++)
                {
                    if (files[i].isFile())
                    {
                        if ((profile = BiomeColorProfile.createFromFile(files[i])) != null)
                        {
                            JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(profile.name);
                            menuItem.addActionListener(new BiomeProfileActionListener(profile, menuItem, profileCheckboxes));
                            if (profile.shortcut != null)
                            {
                                KeyStroke accelerator = KeyStroke.getKeyStroke(profile.shortcut);
                                if (accelerator != null)
                                {
                                    menuItem.setAccelerator(accelerator);
                                }
                                else
                                {
                                    Log.i("Unable to create keyboard shortcut from: " + profile.shortcut);
                                }
                            }
                            menu.add(menuItem);
                            profileCheckboxes.add(menuItem);
                            foundProfiles = true;
                        }
                    }
                    else
                    {
                        JMenu subMenu = new JMenu(files[i].getName());
                        if (scanAndLoad(files[i], subMenu))
                        {
                            menu.add(subMenu);
                        }
                    }
                }
                return foundProfiles;
            }