Enhanced error handling for missing tags