Remove strerror(3) from code which may run in multi-thread