lazily install watchdirectory when needed