third refactor of the project: global, errno, strerror