Adding error handling if ip not available