fix bugs about mkdir