switching on/off also the debug flag in addition to the loglevel
reset cursor on after server stop and doc build