removes the hostname file correctly