correctly handle aio_error() and errno