Efficiently debugging the script