Fixed a bug in inotify wrapper