Emmiting close reason together with close event