more robust header finder for phIO