rewrite _mkdirSync