Add tracking of upsert errors