Close app on error