Read from a URL or a file