take either a file path or a URL