public int getPtraceScope() {
    try {
      final InputStream fileStream = myHost.getFileContent(PTRACE_SCOPE_PATH);

      if (fileStream != null) {
        if (!myHost.canReadFile(PTRACE_SCOPE_PATH)) {
          LOGGER.warn(PTRACE_SCOPE_PATH + " file exists but you don't have permissions to read it.");
          return 3; // The strongest possible level
        }
        final BufferedReader buf = new BufferedReader(new InputStreamReader(fileStream, StandardCharsets.UTF_8));

        final String fileContent = buf.readLine();
        try (Scanner scanner = new Scanner(fileContent)) {
          return scanner.nextInt();
        }
        catch (Exception ex) {
          LOGGER.warn("Could not read security level from " + PTRACE_SCOPE_PATH, ex);
          return 3; // The strongest possible level
        }
      }
    }
    catch (IOException | ExecutionException e) {
      LOGGER.warn("Error while uploading file:" + PTRACE_SCOPE_PATH, e);
      return 1;
    }

    return 1; // default PTRACE_SCOPE value
  }
public int getPtraceScope()