added logging to investigate reported issue with localStorage
Merge pull request #618 from MartijnR/master

added more detailed error messages to investigate reported issue with localStorage