Fix exception if file_uri is not a real URI