Path (@NotNull String fileName) { Path file = findBinFile(fileName); if (file != null) { return file; } StringBuilder message = new StringBuilder(); message.append('\'').append(fileName).append("' not found in directories:"); for (Path directory : getBinDirectories()) { message.append('\n').append(directory); } throw new RuntimeException(message.toString()); }