Exit if we cannot connect to MongoDB