Added some error handling to mongocr mechanism