Slightly better exceptions; add test for missing input