Could you not do:

/focus [exists] dondiego
/stopmacro [target=focus, nodead]
etc.

This would cut your errors out and give you the same functionality.