Write directly to MongoDB