Reorder imports
Add xml output in case of xml parsing exception