make prepare-source write to index.json directly like others
all in one helper