Add support for header and footer files, fix path name issues