alter vector file loader to support passing read mode