Add some errorhandling to tasks and states

blueprint taskflow

Change-Id: Ie4147eadb5fa436cd28663082d78fd001a7e3b81