Added FailedCallback. Fixes #170