Slightly modified Java directory watcher sample