Added stage system for writing pep xml files