[ingest] Bug fixes to mitra ingest script