replace hand rolled repo with local datastore
reduce threshold
use buffered channels
compute diff, delta in one operation
ensure png extension is added to file