parse file header