Many users are using custom scripts for various purposes. When placing those scripts under the wrong place they might get deleted during an upgrade process.
Check Point's recommendation is to use the Script Repository available in SmartConsole.
As Check Point Objects, they will survive all upgrades.
Later you can run those scripts on Security Gateways by right-clicking them. You can also run them with the Security Management API referring only to the name of the Script object with the parameter "script".
This solution has been verified for the specific scenario, described by the combination of Product, Version and Symptoms. It may not work in other scenarios.