Added a few debug print statements
fixed merge conflict.