write updated IP to file