checking directory structure