let the builder collect the file contents, and extract the yaml header if present