updated directory checks