OS-3184 gcore fails with "no such file or directory" if write fails ...  error is misleading