adds debug code for the server