void (@NotNull Path path, @NotNull String identifier) { // We are currently at IDEA_HOME/ruby/integrationTests/run/RubyMine/bin File dest = new File("../../../report/incorrect-resolves/" + identifier + ".xml"); File destDir = dest.getParentFile(); if (!destDir.exists() && !destDir.mkdirs()) { LOGGER.error("Haven't managed to create directory: " + destDir.getAbsolutePath()); } try { Files.move(path, dest.toPath(), StandardCopyOption.REPLACE_EXISTING); LOGGER.info("Incorrect resolve artifact saved to " + dest.getAbsolutePath()); } catch (IOException e) { LOGGER.error("Cannot save artifact: " + identifier); LOGGER.error(e); } }