Update server.py

moving debug logic into wsgi.py