error in sms method logic if no open or close or ? is specified