better state control of run phase
add #error! to be able to end action with an error state
Merge pull request #55 from pitr-ch/master

better state control of run phase