fix corruption in file