add writeFile on PcapHandler