catch the empty dir case