adding logic to check for pigz and pv