private void checkLogFolder(){
  File folder=new File(folderPath);
  if (!folder.exists()) {
    folder.mkdirs();
  }
}

private void checkLogFolder ( ) { File folder = new File ( folderPath ) ; if ( ! folder . exists ( ) ) { folder . mkdirs ( ) ; } }
make sure the folder of log file exists .
