private void closeResources(){
  try {
    if (writer != null) {
      writer.close();
    }
  }
 catch (  IOException ex) {
    LOGGER.warning("Log: Could not close " + file.toAbsolutePath() + " ("+ ex.getLocalizedMessage()+ ")");
  }
}

private void closeResources ( ) { try { if ( writer != null ) { writer . close ( ) ; } } catch ( IOException ex ) { LOGGER . warning ( "Log: Could not close " + file . toAbsolutePath ( ) + " (" + ex . getLocalizedMessage ( ) + ")" ) ; } }
close the writer , if necessary .
