Fix creation of debug script