Changed assert in config to give specific error message.