public final function checkConfiguration($deep = false) {
    if (!file_exists($this->filename) || !is_readable($this->filename)) {
      throw new ConfigurationNotFoundException("File $this->filename does not exist or is not readable");
    }

    $fileExtension = pathinfo($this->filename, PATHINFO_EXTENSION);
    if (in_array($fileExtension, static::$supportedFileTypes)) {
      return true;
    }

    if (!$deep) {
      return false;
    }

    try {
      $this->parseAndCacheConfiguration();
      return true;
    } catch (ParseException $e) {
      return false;
    }
  }