Improve messages

Signed-off-by: Lance Chen <cyen0312@gmail.com>
Fix incorrectly implemented binary search

The original imeplementation may flip flop between
two nopAttempts and lead to infinite recursion.

Signed-off-by: Lance Chen <cyen0312@gmail.com>
Output constraints to debug.txt for debugging purpose

Signed-off-by: Lance Chen <cyen0312@gmail.com>