add more consistency to host file writing