save record to local storage