fixed bug with saving json to localStorage, it's always writed root directory