Fix to use filename rather than url