checking the end of video file