properly close movie files