#2890: add better debugging information