protected void checkAndConfigure() {
		boolean fileExists;
		try {
			fileExists = file.exists();
		} catch (SecurityException e) {
			LOGGER.warn("Was not allowed to read check file existence, file:[" + filename + "].");
			interrupted = true; // there is no point in continuing
			return;
		}

		if (fileExists) {
			long l = file.lastModified(); // this can also throw a
			if (lastModified ==0) {
				lastModified = l; // is very unlikely.
			}
			if (l > lastModified) { // however, if we reached this point this
				lastModified = l; // is very unlikely.
				doOnChange();
				warnedAlready = false;
			}
		} else {
			if (!warnedAlready) {
				LOGGER.debug("[" + filename + "] does not exist.");
				warnedAlready = true;
			}
		}
	}
abstract method to be run when the file is changed.
ngrinder-controller/src/main/java/org/ngrinder/common/util/FileWatchdog.java