Fix the file header and footer.