refine code, remove the static file class, use tools.staticdir instead