Fix sync writes logic
Add back dependency on tape ids