Add read-headers function