Why does the whole file keep changing?