Check return value for error.
When an output is specified with a file:/// scheme, ensure that the enclosing directory exists in processOutput().