closing directory handle fixed