Adding mode logging to demo