add err param to example