Replaced MongoDB->insert() method with MongoDB->upsert(), which will perform an update if _id (or id) property already exists, otherwise it will perform an insert.