bug fix on template file loader classs