Improve error message for missing symbols