better sequence of directory creation