stricter checking for url vs raw string vs file