[FIX] int_main: change the moment to launch io events
[FIX] int_main: change the moment to launch io events

The io events should be executed before the loop() and the save action should
be executed after the loop().

charlesvdv/arduinint,charlesvdv/arduinint,charlesvdv/arduinint,charlesvdv/arduinint