add debugging for failures