write cache.json prettily
show state before progress bar