#22 changed method of branch state check to use grep instead of wildcard matching to make sure the match is exact