Introduced a generic expect command