code: def _CheckStorageFile(self, storage_file_path):  # pylint: disable=arguments-differ
      
      if os.path.exists(storage_file_path):
        if not os.path.isfile(storage_file_path):
          raise errors.BadConfigOption(
              'Storage file: {0:s} already exists and is not a file.'.format(
                  storage_file_path))
        logger.warning('Appending to an already existing storage file.')
  
      dirname = os.path.dirname(storage_file_path)
      if not dirname:
        dirname = '.'
  
      # TODO: add a more thorough check to see if the storage file really is
      # a plaso storage file.
  
      if not os.access(dirname, os.W_OK):
        raise errors.BadConfigOption(
            'Unable to write to storage file: {0:s}'.format(storage_file_path))
docs: Checks if the storage file path is valid.
  
      Args:
        storage_file_path (str): path of the storage file.
  
      Raises:
        BadConfigOption: if the storage file path is invalid.