use pickle to save CPU state