change way watch extension looking for root directory name