Added energy logging. Gotta get to the bottom of this.