Add API output variable and add more assertions