modified logging to return status code if it isn't 200