Refine output in case of error.