Added error message for invalid IP