logging string index errors and combining token annotations