Added the video saving after few changes