Added exception handling for IP data and prettier output formatting