input: Write a function to deploy an application using subprocess and kubectl commands.
  assert deploy_application('myapp', 'manifest.yaml') == 'Application myapp deployed successfully'
  assert deploy_application('anotherapp', 'invalid_manifest.yaml').startswith('Error deploying application anotherapp')
output: def deploy_application(app_name, manifest_file):
      import subprocess
  
      try:
          result = subprocess.run(
              ['kubectl', 'apply', '-f', manifest_file],
              check=True,
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE,
              text=True
          )
          return f"Application {app_name} deployed successfully"
      except subprocess.CalledProcessError as e:
          return f"Error deploying application {app_name}: {e.stderr}"