Check my last suggested code regarding reading the switch. As the switch "makes" once per 100 000 bounces are not interesting. Use the first low level to trigger. Note my dirty delay at the end of the code.
I also missed to check the LOWs and HIGHs in the if statements.