resolved maintimer execution logic after a exception in the main the loop