added tracing for debugging
added predicates to error tags for more discrete handling of specific errors