Read template file into buffer