Fortran Runtime Error Cannot Write To File Opened For Read