Added data logging on local storage