Moved host entries printing to its own function