Add residual to CSV export