Add basic error handling for required flags