Use error msg. as output

[skip ci]