checked for mongo connectivity, and exit if not available