fix for writing local when actually logging online, fix malformed json when pushing local data to online