open and close file. replace contents of file. comments