getCachedFileURL - err callback made voluntary

Hi,
I have added condition in method getCachedFileURL in order to make error callback voluntary.

BTW my text editor removed trailing spaces from this file. If you don't like it, I can revert it and make this PR again.