uninstall json plugin when setup json_formatting and install when close
fix install json plugin when close and refactor monkey patch handler error