add mode precondition in scan/send command