Now can output video frames at each iteration.
now properly outputs video frames if extra command line argument given.