FIX: case when there is no matching directory