log data to history.txt, read history.txt into ram on startup