Raise error when a mode option is not given