Monitoring and repair of defects in ultrasonic additive manufacturing