Update output close structure
Update output and closing of output format context