Add interrupt in the inner loop