add return callback on error