Added error handling for xhr fails during fetch

Now also has importRoot hack. I don't expect you to merge it, but it works for our use case.