Added debugging to Ruby scripts