Add parameterization of middleware to paste config file;