add fail callback