Debug

Added working version of debug script.