added snapshot writing capability per frame