Oops - fputs takes the file pointer second, not first!