Updated the demo function for new logging system