changed mongo driver initialization to handle possible disconnects