insert into mongo as we go so we don't have to hold it all in memory