Made some changes to check.py