remove redirection for exceptions, and change format to json.