Fix KeyError with empty file in LocalStorage