@Override
    public void run() {
        if (observedFilePath.toFile().exists()) {
            performKindBasedAction(ENTRY_CREATE, observedFilePath.toFile());
        }
        while (true) {
            WatchKey key;
            try {
                key = watcher.take();
            } catch (InterruptedException e) {
                return;
            }

            if (key == null) {
                continue;
            }

            for (WatchEvent<?> event : key.pollEvents()) {
                WatchEvent.Kind kind = event.kind();

                if (kind == OVERFLOW) {
                    LOGGER.error("[{}] : Overflow event!", observedFilePath);
                    continue;
                }

                WatchEvent<Path> ev = cast(event);

                // If this is actually the file we're looking at, do something.
                if (ev.context().getFileName().equals(observedFilePath.getFileName())) {
                    LOGGER.debug("[{}] : Activity of kind {}", observedFilePath, ev.kind().name());
                    performKindBasedAction(ev.kind(), observedFilePath.toFile());
                }
            }

            boolean valid = key.reset();
            if (!valid) {
                LOGGER.error("Error: WatchKey broke.");
                break;
            }
        }
    }