Finished create directory function