Adding io_file_read function, fixing a bit on write as well.