add debug information in case of failure, in patch for bug 853568