Add saving to MongoDB database.