Added a callback for ensureIndex