deal header and change the file right