Added support for failure