added -px option to preserve the xml file for debugging purposes