Adding logging when mongo interactions fail.