better error message for failed MongoDB connection