Replaced depricated method ensureIndex with createIndex