Add errno support