added loop for downloading all commit data first before actually writing any commits. This allows us to create them in the right order.