updating memory print to file