Trying to move up debug middleware