allow to specify returns as file name, some optimization around external-template