Detecting anomaly in electrical wire