cmd: Output error messages to stderr where appropriate.