better error messages and control