Write payload and IP to file