display header correcttly, detect .txt/.csv extensions too