Added a chunk wrapper class, only write back a frame if it has been modified