Write list to IP file in both scenarios.