changes to use either file or URL