Added index conditional write