Added 404 status code. Exceptions now are logged in json.