Added exception handling of MongoExceptions