Fixed error with not outputting ontology terms in investigation file. Closes #182