adding battery history recording. saving it to file