Catch KeyboardInterrupt exceptions and stop processes gracefully when catched