question: private void appendStatString ( String textLine ) throws AdeInternalException { if ( statsFilePath == null ) { throw new AdeInternalException ( "No write capability" ) ; } FileOutputStream fos = null ; try { fos = new FileOutputStream ( statsFilePath , true ) ; final PrintWriter writer = new PrintWriter ( new BufferedWriter ( new OutputStreamWriter ( fos , StandardCharsets . UTF_8 ) ) ) ; writer . println ( textLine ) ; writer . close ( ) ; } catch ( IOException t ) { final String msg = String . format ( "Unexpected throwable (%s) while appending to: %s. Statistics recording halted." , t . toString ( ) , t , statsFilePath ) ; logger . error ( msg , t ) ; throw new AdeInternalException ( msg , t ) ; } finally { try { if ( fos != null ) { fos . close ( ) ; } } catch ( IOException t ) { final String msg = String . format ( "Unexpected throwable (%s) while closing: %s." , t , statsFilePath ) ; logger . error ( msg , t ) ; } } }
target:  self-explanatory method for appending a single line to the text file associated with this instance