First attempt to move I/O operations to SPARK.Text_IO. Results only partially successful so far.