Catch potential mongo DB errors on insert and write out diagnostics