fixed writing of offsets when streaming out shape files