Simplify checking directory