#495 Replaced strerror with strerror_r

I have replaced strerror with strerror_r.