Change the name of the write.php file to process.php
Move write to xml functionality to includes/persist.inc