new optimization and attempts to debug why pen 4 is failing
fixed bug that incorrectly tracked energy-recieved by drivers
flush files when logging