raise error if conf is invalid