Read headers in one go and added an incomplete test