Updated file detection rules (based on legacy's)
externalized templates in files