Move debug output to running procedure