Check Directory Selector and Replace if only Required