if a required flag is missin an error is raised