close event customization related code updated

issue resolved on close event