[#75985494] Safely write to local storage