@Override
    public boolean nextConfig(long timeout) {
        file.validateFile();
        if (checkReloaded()) {
            log.log(FINE, () -> "User forced config reload at " + System.currentTimeMillis());
            // User forced reload
            setConfigIfChanged(updateConfig());
            ConfigState<T> configState = getConfigState();
            log.log(FINE, () -> "Config updated at " + System.currentTimeMillis() + ", changed: " + configState.isConfigChanged());
            log.log(FINE, () -> "Config: " + configState.getConfig().toString());
            return true;
        }
        if (file.getLastModified() != ts) {
            setConfigIncGen(updateConfig());
            return true;
        }
        try {
            Thread.sleep(timeout);
        } catch (InterruptedException e) {
            throw new ConfigInterruptedException(e);
        }

        return false;
    }
@Test(expected = IllegalArgumentException.class)
    public void require_that_bad_file_throws_exception() throws IOException {
        // A little trick to ensure that we can create the subscriber, but that we get an error when reading.
        writeConfig("intval", "23");
        ConfigSubscription<SimpletypesConfig> sub = new FileConfigSubscription<>(
                new ConfigKey<>(SimpletypesConfig.class, ""),
                new FileSource(TEST_TYPES_FILE));
        sub.reload(1);
        Files.delete(TEST_TYPES_FILE.toPath()); // delete file so the below statement throws exception
        sub.nextConfig(0);
    }