Fixed up so will use URL if provided. Fall back to file if not URL provided