Write to a particular line in a file

Delete the first line. The first write is just to create the file test.foo for this demonstration.