Add error and answer handler