opening and reading the header, more or less