proper exit with console return