diff --git a/Inst_eddies/Tests/test_write_eddy.f90 b/Inst_eddies/Tests/test_write_eddy.f90
index 944eed64d837824dc3c508ddd5636222a0795e52..33f636cb55775eb5674c9f3e680bcbaeab298f51 100644
--- a/Inst_eddies/Tests/test_write_eddy.f90
+++ b/Inst_eddies/Tests/test_write_eddy.f90
@@ -15,22 +15,17 @@ program test_write_eddy
   implicit none
 
   TYPE(shpc_slice_handler) hshpc
-  integer i, ishape
+  integer i, ishape, iostat
   integer:: n_eddies = 50000
-  logical exist
   logical:: mixed = .true.
   namelist /main_nml/ n_eddies, mixed
 
   !--------------------------------------------------------------
 
-  inquire(file = "SHPC_cyclo/extremum.shp", exist = exist)
-  
-  if (exist) then
-     call shpc_open(hshpc, shpc_dir = "SHPC_cyclo", pszaccess = "rb+")
-  else
-     call shpc_create(hshpc, shpc_dir = "SHPC_cyclo", cyclone = .true.)
-  end if
-
+  call shpc_open(hshpc, shpc_dir = "SHPC_cyclo", pszaccess = "rb+", &
+       iostat = iostat)
+  if (iostat /= 0) call shpc_create(hshpc, shpc_dir = "SHPC_cyclo", &
+       cyclone = .true.)
   print *, "Enter namelist main_nml."
   read(unit = *, nml = main_nml)