Added checks for blank URLs or FileNames, not necessary but good for debugging