Fix "ouput" typo and add a check.