Add debug printing in order to exit loop