Fix #5; add error for missing required attribute