added alert to onfail handler