Cleanup and put console logs under a trace condition.