added 'dbg' url param to turn on debugging, in particular this enables request debugging