Fix close trace files