                print('step:%d, eq_delay:%e, orig_delay:%e, gain:%e'%(step, d_e, d_o, (d_e-d_o)/d_o))
                record_file = open(txt_file, 'a')
                record_file.write('%d %e %e %e\n'%(step, d_e, d_o, (d_e-d_o)/d_o))
                record_file.close()
                Orig_delays[step] = d_o
                Eq_delays[step] = d_e
