Improve Agent Host debug log export (#331665)