Data logging added, not completed yet