Handle error in chrome packaged app for localStorage