Add create sub directory function