On exit command, check if there are any unsent messages