added logging / middleware config