monitor a directory and log changes to a file