avoid generating uncaught exceptions in app

Hi,

I have put this code to avoid uncaught exceptions crashing app when no mongo connexion, in order application to be still running even when mongo is stopped.

Kindly,

Jul