Write IP & success code to CSV