Added back missing import for HttpResponse; wrapped timing messages to stdout in DEBUG condition