add error info to output