fix bug of calling private function _mkdirs without