How does the FSM react after an error or timeout at a stage?