Add delay middleware