prefer as_string() method when writing data
to pipe