making callback error aware