public function __construct(string $path, ?OutputCallbackInterface $decorated = NULL) { $this->handle = fopen($path, 'a'); if (empty($this->handle)) { throw new \RuntimeException("Could not open or create '{$path}' for writing."); } }