Removed no longer used CopyStream function