added more debug printfs to bundle.cc
put in a test to prevent printing too many debug statements