fix regression maketemplate raising an exceptionon non existing file