hook code re-formated (avoid hidden files and non-executable files in template directory)