Split task state completed into success and error to track execution