file i/o and snapshot recording