Improve check.py if subprocess fails