Added ping check before adding apt proxy