I think that would be more clear to assign the result of exists to a result var and then test result.stdout in the assert