Updated to throw when mongo fails

This will trigger a restart and correctly recover from a failed mongo
connection rather than getting stuck.