Added KeyboardInterrupt except clauses before catch-all except clauses to continue raising the KeyboardInterrupt