raise Timeout exception if taking too long