better error message for undefined function; more clues