Update pipeline.py

write data to a file...