Using `fail` instead of deprecated `error`