add inotify support and basic command line options