Added data logger functionality