saves data in RAM and logs