add timeout, isXML, exceptions