Adjusted the template path hardcoding. Now generalized