wrote test for the write to file () under PAF. Need to make it pass next