input: Write a function to create a basic REST API using Python and Flask to list all the countries in the world. The API endpoint should be `/countries` and it should return a JSON response containing a list of all countries. If the given file `data.json` does not exist, return an empty JSON object with a 404 status code.
  
  assert create_countries_api('data.json', []) == {"error": "File not found"}, 404
  assert create_countries_api('data.json', ["USA", "Canada", "Mexico"]) == [{"name": "USA"}, {"name": "Canada"}, {"name": "Mexico"}], 200
  assert create_countries_api('data.json', []) == [], 200
  assert create_countries_api('nonexistent.json', ["France", "Germany"]) == {"error": "File not found"}, 404
output: 
  def create_countries_api(filename, countries):
      try:
          with open(filename, 'r') as file:
              return countries, 200
      except FileNotFoundError:
          return {"error": "File not found"}, 404
  