Potentiometry and repair of electrically stressed nanowires using atomic force microscopy