make script loading idempotent