def textfile_contains(filename, marker):
  """
  Return True if a textfile contains a string.
  """
  try:
    with open(filename, 'r', encoding='utf8') as file:
      text = file.read();
      if marker in text:
        return True
  except Exception as e:
    print(e)

  return False