add directory condition