CreateDirectory has an option to create only if it doesnt exist i believe. no need for the two lines.