code: private boolean startReading() throws IOException, InterruptedException {
          //If the reader is not ready, gives it some milliseconds
          while (!this.reader.ready()) {
              Thread.sleep(this.waitPause);
              if (this.closed) {
                  return false;
              }
          }
          return true;
      }
docs: Checks when we can start reading the output. Timeout if it takes too long in order to avoid hangs