pipeline write cleanup