improved log reporting for IOException and NPE in closeNow