Now thresholds on each channel indivually, added inputdir option