Update to Template handling & disk reads

Update to Template handling; read from disk once and reset to original
file contents for template looping