add failure callback