prepare object refs and downsample stream file