updating debug method in various scripts.