question: public void finished ( long chainLength ) { currentState = chainLength ; if ( loggers != null ) { for ( Logger logger : loggers ) { logger . log ( currentState ) ; logger . stopLogging ( ) ; } } if ( showOperatorAnalysis ) { showOperatorAnalysis ( System . out ) ; } if ( operatorAnalysisFile != null ) { try { PrintStream out = new PrintStream ( new FileOutputStream ( operatorAnalysisFile ) ) ; showOperatorAnalysis ( out ) ; out . flush ( ) ; out . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } }
target:  cleans up when the chain finishes (possibly early).