Better header handling on file reader