renamed append to writePipe