modify featregapply script to operate on zstat images