Removing duplicate error and more version checks for localstorage