public static Config load() {
        if (INSTANCE != null) {
            return INSTANCE;
        }
        Properties props = createPropertiesFromConfigFile();
        if (props == null) {
            return defaultConfig();
        }
        Config config = defaultConfig();
        String path = props.getProperty(KEY_STARTUP_PATH, null);
        if (path != null) {
            File file = new File(path);
            if (file.exists()) {
                config.startupPath = file;
            }
        }

        String modeId = props.getProperty(KEY_VIEWER_MODE, null);
        if (modeId != null && modeId.length() > 0) {
            config.viewerMode = ViewerMode.modeOfId(modeId);
        }
        String backgroundImagePath = props.getProperty(KEY_BACKGROUND_IMAGE, null);
        if (backgroundImagePath != null && backgroundImagePath.length() > 0) {
            File file = new File(backgroundImagePath);
            if (file.exists()) {
                config.backgroundImage = file;
            }
        }
        config.windowHeight = getDoubleProperty(props, KEY_WINDOW_HEIGHT, DEFAULT_WINDOW_HEIGHT);
        config.windowWidth = getDoubleProperty(props, KEY_WINDOW_WIDTH, DEFAULT_WINDOW_WIDTH);
        config.windowX = getDoubleProperty(props, KEY_WINDOW_X, DEFAULT_WINDOW_X);
        config.windowY = getDoubleProperty(props, KEY_WINDOW_Y, DEFAULT_WINDOW_Y);
        config.fullScreen = getBooleanProperty(props, KEY_WINDOW_FULLSCREEN, false);

        INSTANCE = config;
        return INSTANCE;
    }