memory leak, formatting CPU and memory logging