added error logging
fix up workflow states