avoiding IO::String memory leaks