added middleware config to run through files