Changes to resultwriter