Remove debugger and add logging