There is no harm in doing ``os.MkdirAll`` unconditionally so please just drop the ``createDir`` variable to simplify this.