added exception handling if localStorage unavailable or full