Better error messages for missing elements