move var to config and remove dependency on inotifywait