    public static void scanOnReboot() throws InterruptedException, IOException, GeneralSecurityException {
        FileBoolean flag = new RekeySecretAdminMonitor().scanOnBoot;
        if (flag.isOn()) {
            flag.off();
            RekeyThread t = new RekeyThread();
            t.start();
            t.join();
            // block the boot until the rewrite process is complete
            // don't let the failure in RekeyThread block Jenkins boot.
        }
    }