boolean (Path file, Processor processor) { try (BufferedWriter writer = Files.newBufferedWriter(file)) { processor.process(writer); return true; } catch (Exception e) { LOG.error(e); return false; } }