Updated according to the latest lscache available. 

1. Added some optional debug prints
2. Fixed the error handling for the latest version of browsers. The error name is now a days `QuotaExceededError` in both Firefox and Chrome.