Move errno-protection into string_open_failed()