print a json representation of the error response. Also i changed the name of the file to follow naming convention