Added failsafe, program will always exit on failure