Update Main Script, add Pm Gm check