Added db.close() to MongoDB callback code