Added support for end_if_matched option to run command