properly test the errno