code: private synchronized WatchKey getWatchKeyForPath(final String path) throws IOException {
          WatchKey key = watchKeysByPath.get(path);
          if (key == null) {
              logger.debug("Lazy-instantiating watch key for path: {}", path);
              key = Paths.get(path).register(watchService, interested_types);
              watchKeysByPath.put(path, key);
              pathsByWatchKey.put(key, path);
              listenersByWatchKey.put(key, Collections.newSetFromMap(new ConcurrentHashMap<SFMF4JWatchListener, Boolean>()));
          }
          return key;
      }
docs: Gets the watch key for a path with lazy initialization.
  @param path the path
  @return a registered watch key for the path
  @throws IOException if lazy initialization fails