More useful log message when something goes wrong, and use the variable that is actually decremented each time.