Added errno to logging
Added errno to logging