New script to check the last active thread