Modified the various WriteTo() methods to all be cancellable.