Push Button State Change (Multiple Conditions)

You should also break those two conditions apart. Check your machine on/off first, if it has changed, print your message.

If it is currently off, you can just return from loop() which skips the reset of loop() and goes back to the beginning. No need to worry about the LED if the machine is OFF.