callback on error - adding variables