A couple lines below this line you need to modify the if 'last_check' in torrent with the 'last_tracker_check'.