Added error flow