improved config error handling