Updated the persistence of the hostname and also fixed the deleting of the localhost entry in the hosts file