modula function for closing all video handles at the end