reinstate static file middleware, fix warnings