Add errno support
Add errno support