adding explicit release of VideoWriter