add r_io_reopen

better now?
free alrady checks if the value is != null, so all those ifs() are not necessary