Adding support for watching files in the middleware