rewriting the file monitor to use the watchService from the java api