Adding stack trace when fail to generate inferred rels.