Closeable requires idempotentency: now only writing BAM index once when closing