A more correct fix for 82cf61a

The lack of an "as" clause was intended, the real bug was a misnamed variable
containing the error message to be logged.