public void close() {
        final int exitValue;

        if (closed) {
            return;
        }
        if (!browserConfigurationOptions.is("honorSystemProxy")) {
          restoreSystemProxy();
        }
        
        if (process == null) {
            return;
        }
        LOGGER.info("Killing Safari...");
        exitValue = AsyncExecute.killProcess(process);
        if (exitValue == 0) {
            LOGGER.warn("Safari seems to have ended on its own (did we kill the real browser???)");
        }
        closed = true;

        if (backedUpCookieFile != null && backedUpCookieFile.exists()) {
            File sessionCookieFile = new File(originalCookieFilePath);
            boolean success = sessionCookieFile.delete();
            if (success) {
                LOGGER.info("Session's cookie file deleted.");
            } else {
                LOGGER.info("Session's cookie *not* deleted.");
            }
            LOGGER.info("Trying to restore originalCookieFile...");
            originalCookieFile = new File(originalCookieFilePath);
            LauncherUtils.copySingleFile(backedUpCookieFile, originalCookieFile);
        }
    }