Adding events emitter, and functions used for opening and closing watcher connections