[TASK] Refactor header reading to dedicated method