Minor refactoring into watchProjectRoot and _unwatchProjectRoot