Adding error checking to mongo commands performed on user database.
Auto-generating size index if nodes to not contain it