prosody: implement the pho file writer