void (@NotNull Object file, @NotNull Path path) { try { objectMapper.writerWithDefaultPrettyPrinter().writeValue(path.toFile(), file); } catch (IOException e) { throw new RuntimeException("Failed to write data to " + path, e); } }