Prints chain files then reads them back in

Intended to fix the memory problems by not keeping the chain in the RAM.