verify function properly handles <if> tags and will output better error messages