Raise a more helpful error when naming fails