move test for --header earlier