better error handling for bad json and errors coming back from mongo shell