add Cleanup function to close open inotify watches

bug: 101635