What did James Madison do when trade relations were difficult with France and Britain?

A) lowered prices on goods

B) asked Germany for help

C) closed off American ports

D) started a war