errno fixed for read,write,close