Between these two scripts, which one is more stable? Any hints or comments regarding these two scripts are highly appreciated.