fix inputfile, add used_sample_ratio