add logging to payload gen