Added logic to return logs with the response