fixed issue where when output was being tee'ed it was not being written to the string