Logger totalEnergy and reading output