MongoDB client save function.