better error messages when headers are missing

resolves #17