template directory based on file location