Reworked the reading part of inotify to read more stuff and some more error checking