updated to include write out of t_diff files