Simplify logic for determining _dir