Support for timeouts and returned headers; better error traping