exit with callback