Added some file template logic