Add abort and failure hooks