make inotify wrangling more robust