In race conditions, if the documents is removed between the time the resource presence is checked and the construction of the directory iterator, then the `\UnexpectedValueException` is thrown.

I successfully triggered the exception by running the ResourceWatcher on a directory containing about 40000 files in 5000 directories every 1000000 microseconds between two loops and `rm -Rf` on the watched dir while executing.