pass error in stop callback