modify hosts file when reconfigure network or hostname