With three wires going to the switch, it's not out of the question that the machine checks to ensure if the door is open that it is not closed and vice versa. It could be checking both states of the switch. Have you confirmed that the switch wiring is properly engaged with the main board?