Writes output to a string for checking.

Updates tests to reproduce #1. Unable to reproduce.