Fix for formats so they give better output on failure conditions. (#6141)