better message for onclose and on error