Better handle Json import and export exceptions.