add handle_message/1 for to detect closes