aded support for a fail callback - per #219