fixed compilation warnings due to strerror() missuse and different pointers types