close collection after checks in db.rename