Checking stop signal for loop stop by SIGINT