change fail/catch to quit/quit