public WatchKey addWatcher(String folderPath, int mask, boolean watchSubtree) throws IOException {
		Watcher watcher = notifier.addWatcher(folderPath, mask, watchSubtree);
		Watcher previousWatcher = registeredWatchers.put(watcher.getWatchKey(), watcher);
		if (previousWatcher != null) {
			LOG.warn(StringUtil.concatenateStrings(
					"Failed to register a watcher. A watcher is already watching folder path: ", folderPath));
		}
		return watcher.getWatchKey();
	}