Added messages and exit functions