fix bug 428173

Output file not closed

Signed-off-by: sguan-actuate <sguan@actuate.com>