Change header parsing by reading the first line

For the header parsing simply the first line needs to be read. Hence,
this commit.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>