update to use file or URL