add outfmt option

fix wrong assertion, add docu