Add diagnostic information in case of failures.