added some debugging code and made it so it can be turned on with console command "Client.DEBUG = true"