add better error message when opt is missing