Add a write test for pf