Re-rename the format parameter to mode

Thanks to @glensc for noticing that stupid name clash between the
$format-parameter and the format for the output.