moved template creation out of file#open block
moved template creation out of file#open block

crismali/magic_lamp,crismali/magic_lamp,lazylester/magic_lamp,lazylester/magic_lamp,lazylester/magic_lamp,crismali/magic_lamp