pub fn record_output_str(val: &str) -> Result<(), Error>
Records a string to the output.
Returns an error if the write fails.