Update print-failure and print-error to handle various output formats.