avoid working on non-existing dir