Adding a filter to control the directories