better config validation