modified close message in streamhandler