We also have tons of checks in place to make sure the machines work. There are calibration runs where known stacks of votes are sent through the machines and confirmed at the end. The vote totals on the machines are checked against the number of people who voted. Post-election, election officials randomly choose machines, open them up in front of the public at preannounced times, and confirm that the ballots that have been locked inside the machine match the tally the machine produced.