public void loadConfig () {
        File folder = getDataFolder();
        PluginDescriptionFile pdfFile = getDescription();
        File configFile = new File(getDataFolder(), "config.yml");
        Properties settingsFile = new Properties();
        if (! (folder.exists())) {
            try {
                folder.mkdir();
                log.info("[More Mobs] Created folder.");
            } catch (Exception ex) {
                log.info("[More Mobs] Failed to create folder!");
                getServer().getPluginManager().disablePlugin(plugin);
            }
        }
        if (! configFile.exists()) {
            try {
                configFile.createNewFile();
                FileOutputStream out = new FileOutputStream(configFile);
                settingsFile.put("Version", Double.toString(version));
                settingsFile.put("MaxSpawnLimit", Integer.toString(maxSpawnLimit.intValue()));
                settingsFile.store(out, "Configuration file for More Mobs " + pdfFile.getVersion());
                log.info("[More Mobs] Created configuration file.");
            } catch (IOException ex) {
                log.info("[More Mobs] Failed to create configuration file!");
            }
        } else {
            try {
                FileInputStream in = new FileInputStream(configFile);
                try {
                    try {
                        settingsFile.load(in);
                        if (! settingsFile.getProperty("Version").equals(version)) {
                            FileOutputStream out = new FileOutputStream(configFile);
                            settingsFile.put("Version", Double.toString(version));
                            settingsFile.put("MaxSpawnLimit", Integer.toString(maxSpawnLimit.intValue()));
                            settingsFile.store(out, "Configuration file for More Mobs " + pdfFile.getVersion());
                            log.info("[More Mobs] Updating configuration file!");
                        }
                    } catch (NullPointerException ex) {
                        log.info("[More Mobs] Failed to update configuration file! Disabling plugin.");
                        getServer().getPluginManager().disablePlugin(plugin);
                    }
                    settingsFile.load(in);
                    maxSpawnLimit = Integer.valueOf(settingsFile.getProperty("MaxSpawnLimit"));
                    log.info("[More Mobs] Loaded configuration file.");
                } catch (IOException ex) {
                    log.info("[More Mobs] Failed to load configuration file! Disabling plugin.");
                    getServer().getPluginManager().disablePlugin(plugin);
                }
            } catch (FileNotFoundException ex) {
                log.info("[More Mobs] Failed to load configuration file! Disabling plugin.");
                getServer().getPluginManager().disablePlugin(plugin);
            }
        }
    }