Improve error handling when no element is missing its name attribute. Still need to set debug flag to see exception.