add debug output for script