debug mode
clean up the resrouces by bringing channels back to inputs