fix a file's header