Added methods for registering failure and success callbacks