private static String readText(String path) throws IOException {
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new InputStreamReader(new FileInputStream(path), "UTF-8"));
            String line;
            StringBuilder builder = new StringBuilder();
            while ((line = reader.readLine()) != null) {
                builder.append(line).append('\n');
            }
            return builder.toString();
        } catch (FileNotFoundException e) {
            error("The file " + path + " does not exist");
            throw e;
        } catch (IOException e) {
            error("Error in reading the file " + path);
            throw e;
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e) {
                    error("Error when closing the input reader of " + path);
                }
            }
        }
    }
Read the text content of the given file.

@param path the path of the file
@return the textr content of the file
@throws IOException if there are any issues in reading the file
modules/siddhi-core/src/main/java/io/siddhi/core/debugger/SiddhiDebuggerClient.java