improve diagnostics on failure