Added exception to catch timeout errors.