Made this work properly with XML and new Temp .sh files