Improve dbn watcher code