Add write_concept ot check error while writing to MongoDB