Bug 189813 After modify a wrong preview report, when preview in Web viewer it can not process the document file[1102]
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/ReportDocumentWriter.java
if ( checkpoint == CHECKPOINT_END )
			{
				writeMap( coreStream, bookmarks );
				TOCBuilder.write( tocTree, coreStream );
				writeMap( coreStream, idToOffset );
				writeMap( coreStream, bookmarkToOffset );
			}
			coreStream.flush( );
		}
		catch ( IOException ex )
		{
			logger
					.log( Level.SEVERE, "Failed to save the core stream!",
							ex );
		}
		finally
		{
			if ( out != null )
			{
				try
				{
					out.close( );
					out = null;
				}
				catch ( Exception ex )
				{
				}
			}
		}	
	}