Clean shutdown on KeyboardInterrupt
implemented video writing (only for windows)