Refactor error message
Put in an element, outside the wrong conditional scope