Fix calling undefined function

The function `fail` does not exist, I believe you meant to use `done`.