Implemented basic data-logging.