Fortran 77: Read from file and write from file