replaced class ErrorMapping with function posix_strerror
add handlers
add handler
some refactor
exit handler