Check for test environment to output stack trace
Output the ontology id, not the ruby object id