middleware file for conductor