Added `write` expectation, to test output to $stdout/$stderr.