Source: http://www.chem.helsinki.fi/~manninen/fortran2014/3_File_IO.pdf