better condition for default directory