io.save(): fixed a problem when saving to text