Error checking of electrical circuit