added str magic for IOStream