better logging of path to statusCode