add global var reset in the safeRequire, more tests