extract.py to extract important output information