Improving error handling on Mongo connection failure