console log and error on disconnect