new function
fixed to have longer timeout and check for xml file completeness