Error handling into the spy method
Add error message to execution tree