working inotify based dvr isegment code