improving error message when no URIs remain